//
//  CPStyleListLayout.swift
//  PXPoetryStudy
//
//  Created by apple on 2021/6/15.
//

import UIKit

class CPStyleListLayout: UICollectionViewFlowLayout {
    override init() {
        super.init()
        configLayout()
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
        configLayout()
    }
    
    func configLayout(){
        let sWidth = UIScreen.main.bounds.width
        let width = (sWidth-48)/2
        self.itemSize = CGSize(width: width, height: 118)
        self.sectionInset = UIEdgeInsets(top: 16, left: 16, bottom: 16, right: 16)
        self.minimumLineSpacing = 16
        self.minimumInteritemSpacing = 16
        self.footerReferenceSize = CGSize(width: 0.1, height: 0.1)
        self.headerReferenceSize = CGSize(width: 0.1, height: 0.1)
        self.scrollDirection = .vertical
    }
}
